<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('stations', function (Blueprint $table) {
            $table->increments('id');
			$table->unsignedInteger('company_id')->index()->comment('公司ID');
			$table->unsignedInteger('project_id')->index()->comment('项目ID');
			$table->decimal('longitude', 10, 7)->comment('经度');
			$table->decimal('latitude', 10, 7)->comment('纬度');
			$table->string('image')->default('')->comment('图片');
			$table->string('name')->comment('岗位名称');
			$table->text('assignment')->nullable()->comment('报岗任务');
			$table->boolean('status')->default(1)->comment('状态');
			$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('stations');
    }
}
